package com.lcb.blog.service;

import com.lcb.blog.base.BaseResponse;
import com.lcb.blog.entity.User;
import org.springframework.web.bind.annotation.*;

/****
 * @Author:lcb
 * @Description:User业务层接口
 * @Date: 2020-12-29 14:38:32
 *****/
public interface UserService {

    /***
     * User多条件分页查询
     * @param user
     * @param page
     * @param size
     * @return
     */
    @GetMapping("/findUserList/{page}/{size}")
    BaseResponse findUserList(@RequestBody User user, @PathVariable(value = "page") int page, @PathVariable(value = "size") int size);

    /***
     * 删除User
     * @param ids
     */
    @DeleteMapping("/deleteUserById/{ids}")
    BaseResponse deleteUserById(@PathVariable(value = "ids") String ids);

    /***
     * 修改User数据
     * @param user
     */
    @PutMapping("/updateUser")
    BaseResponse updateUser(@RequestBody User user);

    /***
     * 新增User
     * @param user
     */
    @PostMapping("/addUser")
    BaseResponse addUser(@RequestBody User user);

    /**
     * 根据ID查询User
     *
     * @param id
     * @return
     */
    @GetMapping("/findUserById/{id}")
    BaseResponse findUserById(@PathVariable("id") Integer id);

    /***
     * 查询所有User
     * @return
     */
    @GetMapping("/findUserAll")
    BaseResponse findUserAll();
}
